<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>1</title>
    <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/static/layui-v2.5.7/layui/css/layui.css"  media="all">
</head>
<body>


    <style type="text/css">
        .bgimg {
            background: url('/static/img/dimg12.jpg') no-repeat;
            background-size: cover;
            -webkit-background-size: cover;
            -o-background-size: cover;
            background-position: center 0;
        }

            .bgimg2 {
                background: url('/static/img/dimg11.jpg') no-repeat;
                background-size: cover;
                -webkit-background-size: cover;
                -o-background-size: cover;
                background-position: center 0;
            }

            .bgimg3 {
                background: url('/static/img/dimg10.jpg') no-repeat;
                background-size: cover;
                -webkit-background-size: cover;
                -o-background-size: cover;
                background-position: center 0;
            }
    </style>

</head>

<ul class="layui-nav">
    <li class="layui-nav-item"><a href="/jump3">主页</a></li>
  <li class="layui-nav-item"><a href="/searchWorkerEvaluator">个人评价</a></li>
  <li class="layui-nav-item">
    <a href="javascript:;">个人信息</a>
    <dl class="layui-nav-child">
      <dd><a href="/createWorkerInfo">创建</a></dd>
        <dd><a href="/updateWorkerInfo">修改</a></dd>
        <dd><a href="/showWorkerInfo">查看</a></dd>
    </dl>
  </li>
  <li class="layui-nav-item"><a href="/shen_zhaopinxinxi2">招聘信息</a></li>

    <li class="layui-nav-item layui-col-md-offset8" lay-unselect="">
        <div><img src="/static/img/pimg2.jpg" class="layui-nav-img">{{ u }}</div>
        <dl class="layui-nav-child">
            <dd><a href="/">登出</a></dd>
        </dl>
    </li>
</ul>


        <div class="layui-card-header">企业员工信息表</div>

        <table id="demo" lay-data="{height:'full-20'}" lay-filter="test"  ></table>

<script src="/static/layui-v2.5.7/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('table', function(){
  var table = layui.table;

  //第一个实例
  table.render({
    elem: '#demo'
    ,url: '/searche' //数据接口

    ,page: true //开启分页
    ,cols: [[ //表头
      {type:'radio'}

      ,{field:'reason', width:300, title: '原因'}
      ,{field:'creatime', width:175, title: '建立时间'}
      ,{field:'Grade', width:175, title: '评分'}
      ,{field:'Evaluator', width:175, title: '评价'}
    ]]
  });
  //监听头工具栏事件
  table.on('toolbar(test)', function(obj){
    var checkStatus = table.checkStatus(obj.config.id)
    ,data = checkStatus.data; //获取选中的数据
    switch(obj.event){
      case 'add':
        layer.msg('添加');
      break;
      case 'update':
        if(data.length === 0){
          layer.msg('请选择一行');
        } else if(data.length > 1){
          layer.msg('只能同时编辑一个');
        } else {
          layer.alert('编辑 [id]：'+ checkStatus.data[0].id);
        }
      break;
      case 'delete':
        if(data.length === 0){
          layer.msg('请选择一行');
        } else {
          layer.msg('删除');
        }
      break;
    };
  });
    element.on('nav(demo)', function(elem){
    //console.log(elem)
    layer.msg(elem.text());
  });

});
</script>
</body>
</html>